#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QObject>
#include "ui_mainwindow.h"
#include "salesdialog.h"
#include "purchasedialog.h"
#include "vipdialog.h"
#include "exitdialog.h"
#include <iostream>
#include <QTimer>
#include "sqlmanage.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    friend class PurchaseDialog;
    friend class VipDialog;
    friend class SalesDialog;
    friend class ExitDialog;
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
protected:
    void closeEvent(QCloseEvent *event);
private slots:

    void on_Sales_button_clicked();

    void on_Purchase_button_clicked();

    void on_Vip_button_clicked();

    void on_Exit_button_clicked();

    void salesClosed();

    void purchaseClosed();

    void vipClosed();

    void exitClosed();

private:
    Ui::MainWindow *ui;
    class SalesDialog *sdlg;
    class PurchaseDialog *pdlg;
    class VipDialog *vdlg;
    class ExitDialog *edlg;
};

#endif // MAINWINDOW_H
